<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnIsDefaultInAttributeValueTable extends AbstractMigration
{
    public function up()
    {
        $this->table('attribute_value')->addColumn("is_default", "enum", [
            'values' => "yes,no",
            'default' => "no",
            'comment' => "是否默认",
            'null' => false,
        ])->save();
    }

    public function down()
    {
        $this->table('attribute_value')->removeColumn('is_default')->save();
    }
}
